import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main
from util import *
from dungeon import makeFloor, Room, TemplateRoom
import dungeon

template = \
"""
######################
######### < ##########
######         #######
#####            #####
####   &          ####
###  @             ###
##   &         &    ##
#                    #
######################

"""[1:]

legend = {
    '#':    dungeon.rockGenerator(colors['Gray']),

    '&':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('mining equipment', 10, parole.map.AsciiTile('&',
                colors['Black']),
                blockMove=False, massNoun=True), clearFirst=False),

    '@':   dungeon.thingGenerator('npcs', 'crazyminer'),

    '<':    dungeon.upStairGenerator,
}

floorColor1 = colors['SandyBrown']
floorColor2 = colors['SaddleBrown']
floorName = 'dirt floor'
mixture = 0.5

diggable = [
    (10,0),
    (10,8),
]

class MineEntrance(TemplateRoom):
    def __init__(self, pos):
        TemplateRoom.__init__(self, template, legend, diggable, pos,
                floorColor1, floorColor2, mixture, floorName)

roomClass = MineEntrance

